#include "MMaterial.h"
#include "Interfaces.h"
#include "GLTexture.h"
#include "GLTextureManager.h"
#include "MOption.h"
#include "MTechnique.h"

/*! CMMaterial::CreateTechnique
* @param    void
* @return   CMTechnique*
* @see
*/

CMTechnique* CMMaterial::CreateTechnique(void)
{
	if ( m_pTechnique )
	{
		return m_pTechnique;
	}

	CMTechnique* p = new CMTechnique( this );

	m_pTechnique = p;

	return p;  
}

// Removes the technique at the given index.
void CMMaterial::RemoveTechnique( void )
{
   SAFE_DELETE( m_pTechnique );
}


// Gets the best supported technique. 
CMTechnique* CMMaterial::GetTechnique( void )
{
    return m_pTechnique;
}